package com.huowenjie.web;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class R2Controller {

    @RequestMapping("test02/{name}")
    public String test02(@PathVariable String name){

        if("1".equals(name)){
            throw new RuntimeException("====出错了哦====");
        }

        System.out.println("========实例被访问========");

        return name;
    }

}
